package net.system.base.bean;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class TAdExample {
    protected String orderByClause;

    protected List oredCriteria;

    public TAdExample() {
        oredCriteria = new ArrayList();
    }

    protected TAdExample(TAdExample example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
    }

    public static class Criteria {
        protected List criteriaWithoutValue;

        protected List criteriaWithSingleValue;

        protected List criteriaWithListValue;

        protected List criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList();
            criteriaWithSingleValue = new ArrayList();
            criteriaWithListValue = new ArrayList();
            criteriaWithBetweenValue = new ArrayList();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List list = new ArrayList();
            list.add(value1);
            list.add(value2);
            Map map = new HashMap();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List dateList = new ArrayList();
            Iterator iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(((Date)iter.next()).getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andRecIdIsNull() {
            addCriterion("REC_ID is null");
            return this;
        }

        public Criteria andRecIdIsNotNull() {
            addCriterion("REC_ID is not null");
            return this;
        }

        public Criteria andRecIdEqualTo(String value) {
            addCriterion("REC_ID =", value, "recId");
            return this;
        }

        public Criteria andRecIdNotEqualTo(String value) {
            addCriterion("REC_ID <>", value, "recId");
            return this;
        }

        public Criteria andRecIdGreaterThan(String value) {
            addCriterion("REC_ID >", value, "recId");
            return this;
        }

        public Criteria andRecIdGreaterThanOrEqualTo(String value) {
            addCriterion("REC_ID >=", value, "recId");
            return this;
        }

        public Criteria andRecIdLessThan(String value) {
            addCriterion("REC_ID <", value, "recId");
            return this;
        }

        public Criteria andRecIdLessThanOrEqualTo(String value) {
            addCriterion("REC_ID <=", value, "recId");
            return this;
        }

        public Criteria andRecIdLike(String value) {
            addCriterion("REC_ID like", value, "recId");
            return this;
        }

        public Criteria andRecIdNotLike(String value) {
            addCriterion("REC_ID not like", value, "recId");
            return this;
        }

        public Criteria andRecIdIn(List values) {
            addCriterion("REC_ID in", values, "recId");
            return this;
        }

        public Criteria andRecIdNotIn(List values) {
            addCriterion("REC_ID not in", values, "recId");
            return this;
        }

        public Criteria andRecIdBetween(String value1, String value2) {
            addCriterion("REC_ID between", value1, value2, "recId");
            return this;
        }

        public Criteria andRecIdNotBetween(String value1, String value2) {
            addCriterion("REC_ID not between", value1, value2, "recId");
            return this;
        }

        public Criteria andAdNameIsNull() {
            addCriterion("AD_NAME is null");
            return this;
        }

        public Criteria andAdNameIsNotNull() {
            addCriterion("AD_NAME is not null");
            return this;
        }

        public Criteria andAdNameEqualTo(String value) {
            addCriterion("AD_NAME =", value, "adName");
            return this;
        }

        public Criteria andAdNameNotEqualTo(String value) {
            addCriterion("AD_NAME <>", value, "adName");
            return this;
        }

        public Criteria andAdNameGreaterThan(String value) {
            addCriterion("AD_NAME >", value, "adName");
            return this;
        }

        public Criteria andAdNameGreaterThanOrEqualTo(String value) {
            addCriterion("AD_NAME >=", value, "adName");
            return this;
        }

        public Criteria andAdNameLessThan(String value) {
            addCriterion("AD_NAME <", value, "adName");
            return this;
        }

        public Criteria andAdNameLessThanOrEqualTo(String value) {
            addCriterion("AD_NAME <=", value, "adName");
            return this;
        }

        public Criteria andAdNameLike(String value) {
            addCriterion("AD_NAME like", value, "adName");
            return this;
        }

        public Criteria andAdNameNotLike(String value) {
            addCriterion("AD_NAME not like", value, "adName");
            return this;
        }

        public Criteria andAdNameIn(List values) {
            addCriterion("AD_NAME in", values, "adName");
            return this;
        }

        public Criteria andAdNameNotIn(List values) {
            addCriterion("AD_NAME not in", values, "adName");
            return this;
        }

        public Criteria andAdNameBetween(String value1, String value2) {
            addCriterion("AD_NAME between", value1, value2, "adName");
            return this;
        }

        public Criteria andAdNameNotBetween(String value1, String value2) {
            addCriterion("AD_NAME not between", value1, value2, "adName");
            return this;
        }

        public Criteria andAdContentIsNull() {
            addCriterion("AD_CONTENT is null");
            return this;
        }

        public Criteria andAdContentIsNotNull() {
            addCriterion("AD_CONTENT is not null");
            return this;
        }

        public Criteria andAdContentEqualTo(String value) {
            addCriterion("AD_CONTENT =", value, "adContent");
            return this;
        }

        public Criteria andAdContentNotEqualTo(String value) {
            addCriterion("AD_CONTENT <>", value, "adContent");
            return this;
        }

        public Criteria andAdContentGreaterThan(String value) {
            addCriterion("AD_CONTENT >", value, "adContent");
            return this;
        }

        public Criteria andAdContentGreaterThanOrEqualTo(String value) {
            addCriterion("AD_CONTENT >=", value, "adContent");
            return this;
        }

        public Criteria andAdContentLessThan(String value) {
            addCriterion("AD_CONTENT <", value, "adContent");
            return this;
        }

        public Criteria andAdContentLessThanOrEqualTo(String value) {
            addCriterion("AD_CONTENT <=", value, "adContent");
            return this;
        }

        public Criteria andAdContentLike(String value) {
            addCriterion("AD_CONTENT like", value, "adContent");
            return this;
        }

        public Criteria andAdContentNotLike(String value) {
            addCriterion("AD_CONTENT not like", value, "adContent");
            return this;
        }

        public Criteria andAdContentIn(List values) {
            addCriterion("AD_CONTENT in", values, "adContent");
            return this;
        }

        public Criteria andAdContentNotIn(List values) {
            addCriterion("AD_CONTENT not in", values, "adContent");
            return this;
        }

        public Criteria andAdContentBetween(String value1, String value2) {
            addCriterion("AD_CONTENT between", value1, value2, "adContent");
            return this;
        }

        public Criteria andAdContentNotBetween(String value1, String value2) {
            addCriterion("AD_CONTENT not between", value1, value2, "adContent");
            return this;
        }

        public Criteria andAdLinkIsNull() {
            addCriterion("AD_LINK is null");
            return this;
        }

        public Criteria andAdLinkIsNotNull() {
            addCriterion("AD_LINK is not null");
            return this;
        }

        public Criteria andAdLinkEqualTo(String value) {
            addCriterion("AD_LINK =", value, "adLink");
            return this;
        }

        public Criteria andAdLinkNotEqualTo(String value) {
            addCriterion("AD_LINK <>", value, "adLink");
            return this;
        }

        public Criteria andAdLinkGreaterThan(String value) {
            addCriterion("AD_LINK >", value, "adLink");
            return this;
        }

        public Criteria andAdLinkGreaterThanOrEqualTo(String value) {
            addCriterion("AD_LINK >=", value, "adLink");
            return this;
        }

        public Criteria andAdLinkLessThan(String value) {
            addCriterion("AD_LINK <", value, "adLink");
            return this;
        }

        public Criteria andAdLinkLessThanOrEqualTo(String value) {
            addCriterion("AD_LINK <=", value, "adLink");
            return this;
        }

        public Criteria andAdLinkLike(String value) {
            addCriterion("AD_LINK like", value, "adLink");
            return this;
        }

        public Criteria andAdLinkNotLike(String value) {
            addCriterion("AD_LINK not like", value, "adLink");
            return this;
        }

        public Criteria andAdLinkIn(List values) {
            addCriterion("AD_LINK in", values, "adLink");
            return this;
        }

        public Criteria andAdLinkNotIn(List values) {
            addCriterion("AD_LINK not in", values, "adLink");
            return this;
        }

        public Criteria andAdLinkBetween(String value1, String value2) {
            addCriterion("AD_LINK between", value1, value2, "adLink");
            return this;
        }

        public Criteria andAdLinkNotBetween(String value1, String value2) {
            addCriterion("AD_LINK not between", value1, value2, "adLink");
            return this;
        }

        public Criteria andAdPicIsNull() {
            addCriterion("AD_PIC is null");
            return this;
        }

        public Criteria andAdPicIsNotNull() {
            addCriterion("AD_PIC is not null");
            return this;
        }

        public Criteria andAdPicEqualTo(String value) {
            addCriterion("AD_PIC =", value, "adPic");
            return this;
        }

        public Criteria andAdPicNotEqualTo(String value) {
            addCriterion("AD_PIC <>", value, "adPic");
            return this;
        }

        public Criteria andAdPicGreaterThan(String value) {
            addCriterion("AD_PIC >", value, "adPic");
            return this;
        }

        public Criteria andAdPicGreaterThanOrEqualTo(String value) {
            addCriterion("AD_PIC >=", value, "adPic");
            return this;
        }

        public Criteria andAdPicLessThan(String value) {
            addCriterion("AD_PIC <", value, "adPic");
            return this;
        }

        public Criteria andAdPicLessThanOrEqualTo(String value) {
            addCriterion("AD_PIC <=", value, "adPic");
            return this;
        }

        public Criteria andAdPicLike(String value) {
            addCriterion("AD_PIC like", value, "adPic");
            return this;
        }

        public Criteria andAdPicNotLike(String value) {
            addCriterion("AD_PIC not like", value, "adPic");
            return this;
        }

        public Criteria andAdPicIn(List values) {
            addCriterion("AD_PIC in", values, "adPic");
            return this;
        }

        public Criteria andAdPicNotIn(List values) {
            addCriterion("AD_PIC not in", values, "adPic");
            return this;
        }

        public Criteria andAdPicBetween(String value1, String value2) {
            addCriterion("AD_PIC between", value1, value2, "adPic");
            return this;
        }

        public Criteria andAdPicNotBetween(String value1, String value2) {
            addCriterion("AD_PIC not between", value1, value2, "adPic");
            return this;
        }

        public Criteria andAdStartdateIsNull() {
            addCriterion("AD_STARTDATE is null");
            return this;
        }

        public Criteria andAdStartdateIsNotNull() {
            addCriterion("AD_STARTDATE is not null");
            return this;
        }

        public Criteria andAdStartdateEqualTo(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE =", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE <>", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateGreaterThan(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE >", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE >=", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateLessThan(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE <", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("AD_STARTDATE <=", value, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateIn(List values) {
            addCriterionForJDBCDate("AD_STARTDATE in", values, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateNotIn(List values) {
            addCriterionForJDBCDate("AD_STARTDATE not in", values, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("AD_STARTDATE between", value1, value2, "adStartdate");
            return this;
        }

        public Criteria andAdStartdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("AD_STARTDATE not between", value1, value2, "adStartdate");
            return this;
        }

        public Criteria andAdEnddateIsNull() {
            addCriterion("AD_ENDDATE is null");
            return this;
        }

        public Criteria andAdEnddateIsNotNull() {
            addCriterion("AD_ENDDATE is not null");
            return this;
        }

        public Criteria andAdEnddateEqualTo(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE =", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE <>", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateGreaterThan(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE >", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE >=", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateLessThan(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE <", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("AD_ENDDATE <=", value, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateIn(List values) {
            addCriterionForJDBCDate("AD_ENDDATE in", values, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateNotIn(List values) {
            addCriterionForJDBCDate("AD_ENDDATE not in", values, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("AD_ENDDATE between", value1, value2, "adEnddate");
            return this;
        }

        public Criteria andAdEnddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("AD_ENDDATE not between", value1, value2, "adEnddate");
            return this;
        }

        public Criteria andEnabledIsNull() {
            addCriterion("ENABLED is null");
            return this;
        }

        public Criteria andEnabledIsNotNull() {
            addCriterion("ENABLED is not null");
            return this;
        }

        public Criteria andEnabledEqualTo(Boolean value) {
            addCriterion("ENABLED =", value, "enabled");
            return this;
        }

        public Criteria andEnabledNotEqualTo(Boolean value) {
            addCriterion("ENABLED <>", value, "enabled");
            return this;
        }

        public Criteria andEnabledGreaterThan(Boolean value) {
            addCriterion("ENABLED >", value, "enabled");
            return this;
        }

        public Criteria andEnabledGreaterThanOrEqualTo(Boolean value) {
            addCriterion("ENABLED >=", value, "enabled");
            return this;
        }

        public Criteria andEnabledLessThan(Boolean value) {
            addCriterion("ENABLED <", value, "enabled");
            return this;
        }

        public Criteria andEnabledLessThanOrEqualTo(Boolean value) {
            addCriterion("ENABLED <=", value, "enabled");
            return this;
        }

        public Criteria andEnabledIn(List values) {
            addCriterion("ENABLED in", values, "enabled");
            return this;
        }

        public Criteria andEnabledNotIn(List values) {
            addCriterion("ENABLED not in", values, "enabled");
            return this;
        }

        public Criteria andEnabledBetween(Boolean value1, Boolean value2) {
            addCriterion("ENABLED between", value1, value2, "enabled");
            return this;
        }

        public Criteria andEnabledNotBetween(Boolean value1, Boolean value2) {
            addCriterion("ENABLED not between", value1, value2, "enabled");
            return this;
        }
    }
}